home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
prog
/
gametp20.zip
/
LIMEMS.INT
< prev
next >
Wrap
Text File
|
1992-11-05
|
3KB
|
75 lines
Unit limems;
{ LimEms version 1.0 Copyright (C) 1992 Scott D. Ramsay }
{ ramsays@access.digex.com }
{ This unit allows programmers to use EMS memory. This unit is }
{ used by DSOUND.TPU to load VOC files under 64k to EMS }
{ LIMEMS.TPU can be used freely in commerical and non-commerical }
{ programs. As long as you don't give yourself credit for writing }
{ this portion of the code. When distributing it please include all }
{ files and samples so others may enjoy using the code. Thanks. }
Interface
Uses DOS;
function emsINSTALLED:boolean;
function emsSTATUS:boolean;
procedure emsPAGES(var totalpages,pagesavailable:word);
procedure emsGETMEM(pagesneeded:word;var handle:word);
procedure emsMAP(handle,logicalpage,physicalpage:word);
procedure emsADDRESS(var address:word);
procedure emsFREEMEM(handle:word);
procedure emsVERSION(var st:string);
{ See Implementation section for description of functions }
implementation
(*************************************************************************)
function emsINSTALLED:boolean;
Returns TRUE if EMS driver is installed.
(*************************************************************************)
function emsSTATUS:boolean;
Returns TRUE is EMS is running ok.
(*************************************************************************)
procedure emsADDRESS(var address:word);
address The segment to the EMS map window
(*************************************************************************)
procedure emsPAGES(var totalpages,pagesavailable:word);
totalpages Returns the number of 16k pages in EMS
pagesavailable Returns the number of 16k pages available
(*************************************************************************)
procedure emsGETMEM(pagesneeded:word;var handle:word);
pagesneeded Number of 16k pages to allocate
handle EMS handle to allocated pages
(*************************************************************************)
procedure emsmap(handle,logicalpage,physicalpage:word);
Maps a EMS page to one of the 4 pages in the ems window.
handle EMS handle from emsGETMEM
(*************************************************************************)
procedure emsfreemem(handle:word);
Deallocate EMS memory
handle EMS handle from emsGETMEM
(*************************************************************************)
procedure emsversion(var st:string);
Returns the EMS version string